using System.Collections.Generic;
using System.Data;
using StudentWeb.Model;

namespace StudentWeb.IDAL
{
    public partial interface IWYUserInfoDAO
    {
        /// <summary>
		/// 添加单条记录
		/// </summary>
		/// <param name="wyUserInfo">实体</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Insert(WYUserInfo wyUserInfo, IDbTransaction? trans = null);
        
        /// <summary>
		/// 添加多条记录
		/// </summary>
		/// <param name="list">列表</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Insert(List<WYUserInfo> list, IDbTransaction? trans = null);
        
        /// <summary>
		/// 编辑单条记录
		/// </summary>
		/// <param name="wyUserInfo">实体</param>
        /// <param name="fields">要更新的列</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Update(WYUserInfo wyUserInfo, string? fields = null, IDbTransaction? trans = null);
        
        /// <summary>
		/// 编辑多条记录
		/// </summary>
		/// <param name="list">实体列表</param>
        /// <param name="fields">要更新的列</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Update(List<WYUserInfo> list, string? fields = null, IDbTransaction? trans = null);
        
        /// <summary>
		/// 删除单条记录
		/// </summary>
		/// <param name="wYUserID">主键</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Delete(int wYUserID, IDbTransaction? trans = null);
        
        /// <summary>
		/// 删除单条记录
		/// </summary>
		/// <param name="wyUserInfo">实体</param>
        /// <param name="trans">事务</param>
		/// <returns>影响行数</returns>
        int Delete(WYUserInfo wyUserInfo, IDbTransaction? trans = null);
        
        /// <summary>
		/// 获取单条记录
		/// </summary>
		/// <param name="wYUserID">主键</param>
        /// <param name="fields">要获取的列</param>
        /// <param name="whereClause">条件语句</param>
        /// <param name="param">条件参数</param>
		/// <returns>实体</returns>
        T? GetInfo<T>(int wYUserID, string? fields = null);
        WYUserInfo? GetInfo(int wYUserID);
        T? GetInfo<T>(string? whereClause = null, object? param = null, string? fields = null);
        WYUserInfo? GetInfo(string? whereClause = null, object? param = null);

        /// <summary>
		/// 获取列表
		/// </summary>
        /// <param name="fields">要获取的列</param>
        /// <param name="whereClause">条件语句</param>
        /// <param name="orderBy">排序规则</param>
        /// <returns>实体列表</returns>
        List<T> GetList<T>(string? whereClause = null, object? param = null, string? orderBy = null, string? fields = null);
        List<WYUserInfo> GetList(string? whereClause = null, object? param = null, string? orderBy = null);

        /// <summary>
        /// 分页列表
        /// </summary>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">页面大小</param>
        /// <param name="fields">要获取的列</param>
        /// <param name="whereClause">条件语句</param>
        /// <param name="orderBy">排序规则</param>
        /// <returns>分页列表</returns>
        PagedList<T> GetList<T>(int pageIndex, int pageSize, string? whereClause = null, object? param = null, string? orderBy = null, string? fields = null);
        PagedList<WYUserInfo> GetList(int pageIndex, int pageSize, string? whereClause = null, object? param = null, string? orderBy = null);
    }
}



